package isn99

import (
	"encoding/json"
)

type LoginResp struct {
	MemberID                       int     `json:"memberId"`
	MemberCode                     string  `json:"memberCode"`
	MemberName                     string  `json:"memberName"`
	CurrencyID                     int     `json:"currencyId"`
	CurrencyCode                   string  `json:"currencyCode"`
	CashBalance                    float64 `json:"cashBalance"`
	Outstanding                    float64 `json:"outstanding"`
	BetCredit                      float64 `json:"betCredit"`
	GivenCredit                    float64 `json:"givenCredit"`
	LastLogin                      int64   `json:"lastLogin"`
	LastTransaction                int64   `json:"lastTransaction"`
	OddsGroupID                    int     `json:"oddsGroupId"`
	HasChangedPassword             int     `json:"hasChangedPassword"`
	HasAcceptedAgreement           int     `json:"hasAcceptedAgreement"`
	HasChangedPref                 int     `json:"hasChangedPref"`
	PreferOddsFormat               int     `json:"preferOddsFormat"`
	PreferPageType                 int     `json:"preferPageType"`
	PreferDefaultStake             float64 `json:"preferDefaultStake"`
	PreferPlaceMaxBet              bool    `json:"preferPlaceMaxBet"`
	PreferOddsRefreshTime90Min     int     `json:"preferOddsRefreshTime90Min"`
	PreferOddsRefreshTimeRb        int     `json:"preferOddsRefreshTimeRb"`
	PreferOddsRefreshTimeOther     int     `json:"preferOddsRefreshTimeOther"`
	PreferOddsRefreshTimeFavourite int     `json:"preferOddsRefreshTimeFavourite"`
	PreferWagerShowFormat          int     `json:"preferWagerShowFormat"`
	PreferAcceptHigherOdds         bool    `json:"preferAcceptHigherOdds"`
	PreferLanguageID               string  `json:"preferLanguageId"`
	PreferTimeZone                 int     `json:"preferTimeZone"`
	RestrictParlay                 bool    `json:"restrictParlay"`
	HasAcceptedNewTnc              bool    `json:"hasAcceptedNewTnc"`
	PreferTimeZoneInString         string  `json:"preferTimeZoneInString"`
}

type GameDataResp struct {
	SportID        int  `json:"sportId"`
	ShowDateFilter bool `json:"showDateFilter"`
	Leagues        []struct {
		IsFTHdpEmpty         bool `json:"isFTHdpEmpty"`
		IsAnyEventInHTPeriod bool `json:"isAnyEventInHTPeriod"`
		IsOneByTwoEmpty      bool `json:"isOneByTwoEmpty"`
		IsHdpEmpty           bool `json:"isHdpEmpty"`
		Events               []struct {
			IsFTHdpEmpty        bool   `json:"isFTHdpEmpty"`
			StartDate           int64  `json:"startDate"`
			Periods             string `json:"periods"`
			GroundType          int    `json:"groundType"`
			ShowScoreInfo       int    `json:"showScoreInfo"`
			IsAllEmpty          bool   `json:"isAllEmpty"`
			Score               string `json:"score"`
			IsOtherMarketsEmpty bool   `json:"isOtherMarketsEmpty"`
			Descriptions        []struct {
				TeamName string `json:"teamName"`
				IsHome   string `json:"isHome,omitempty"`
				Name     string `json:"name"`
				Cards    int    `json:"cards"`
			} `json:"descriptions"`
			ID                      int    `json:"id"`
			EventPitcherID          int    `json:"eventPitcherId"`
			IsHTOneByTwoEmpty       bool   `json:"isHTOneByTwoEmpty"`
			IsAnyEventInHTEXTPeriod bool   `json:"isAnyEventInHTEXTPeriod"`
			Is80MinsGame            bool   `json:"is80MinsGame"`
			IsFTOneByTwoEmpty       bool   `json:"isFTOneByTwoEmpty"`
			MatchName               string `json:"matchName"`
			NoOfLines               int    `json:"noOfLines"`
			NoOfFTLines             int    `json:"noOfFTLines"`
			IsAnyEventInHTPeriod    bool   `json:"isAnyEventInHTPeriod"`
			NoOfOtherOpenedMarkets  int    `json:"noOfOtherOpenedMarkets"`
			IsOneByTwoEmpty         bool   `json:"isOneByTwoEmpty"`
			IsHdpEmpty              bool   `json:"isHdpEmpty"`
			HasInplayMarkets        bool   `json:"hasInplayMarkets"`
			Markets                 []struct {
				GroupType int `json:"groupType"`
				Lines     []struct {
					IsEmpty    bool `json:"isEmpty"`
					Sequence   int  `json:"sequence"`
					Selections []struct {
						ID            int     `json:"id"`
						IsEmpty       bool    `json:"isEmpty"`
						Status        int     `json:"status"`
						Name          string  `json:"name"`
						SelIndicator  string  `json:"selIndicator"`
						Handicap      float64 `json:"handicap"`
						OddsFormatted string  `json:"odds_formatted"`
						Odds          float64 `json:"odds"`
						IsNegativeHdp bool    `json:"isNegativeHdp"`
					} `json:"selections"`
					FavoriteType int `json:"favoriteType"`
				} `json:"lines"`
				IsFirstHalf bool   `json:"isFirstHalf,omitempty"`
				HtOrFt      string `json:"htOrFt,omitempty"`
			} `json:"markets"`
			EventSchedule                   int  `json:"eventSchedule"`
			NoOfHTLines                     int  `json:"noOfHTLines"`
			IsHTHdpEmpty                    bool `json:"isHTHdpEmpty"`
			CurrentBettingPeriodChronoOrder int  `json:"currentBettingPeriodChronoOrder"`
			NoOfOtherOpenedMarketsSimple    int  `json:"noOfOtherOpenedMarketsSimple"`
		} `json:"events"`
		IsAllEmpty              bool            `json:"isAllEmpty"`
		IsOtherMarketsEmpty     bool            `json:"isOtherMarketsEmpty"`
		ScoreType               int             `json:"scoreType"`
		ID                      json.RawMessage `json:"id"`
		IsHTHdpEmpty            bool            `json:"isHTHdpEmpty"`
		Name                    string          `json:"name"`
		IsHTOneByTwoEmpty       bool            `json:"isHTOneByTwoEmpty"`
		IsAnyEventInHTEXTPeriod bool            `json:"isAnyEventInHTEXTPeriod"`
		IsFTOneByTwoEmpty       bool            `json:"isFTOneByTwoEmpty"`
	} `json:"leagues"`
	RbIcon            string   `json:"rbIcon"`
	CurrentOddsFormat int      `json:"currentOddsFormat"`
	FiveDays          []string `json:"fiveDays"`
	NumOfLiveEvent    int      `json:"numOfLiveEvent,omitempty"`
	ViewType          int      `json:"viewType"`
	EventSchedule     int      `json:"eventSchedule"`
}

type MemberResp struct {
	MemberID                       int     `json:"memberId"`
	MemberCode                     string  `json:"memberCode"`
	MemberName                     string  `json:"memberName"`
	CurrencyID                     int     `json:"currencyId"`
	CurrencyCode                   string  `json:"currencyCode"`
	CashBalance                    float64 `json:"cashBalance"`
	Outstanding                    float64 `json:"outstanding"`
	BetCredit                      float64 `json:"betCredit"`
	GivenCredit                    float64 `json:"givenCredit"`
	LastLogin                      int64   `json:"lastLogin"`
	LastTransaction                int64   `json:"lastTransaction"`
	OddsGroupID                    int     `json:"oddsGroupId"`
	HasChangedPassword             int     `json:"hasChangedPassword"`
	HasAcceptedAgreement           int     `json:"hasAcceptedAgreement"`
	HasChangedPref                 int     `json:"hasChangedPref"`
	PreferOddsFormat               int     `json:"preferOddsFormat"`
	PreferPageType                 int     `json:"preferPageType"`
	PreferDefaultStake             float64 `json:"preferDefaultStake"`
	PreferPlaceMaxBet              bool    `json:"preferPlaceMaxBet"`
	PreferOddsRefreshTime90Min     int     `json:"preferOddsRefreshTime90Min"`
	PreferOddsRefreshTimeRb        int     `json:"preferOddsRefreshTimeRb"`
	PreferOddsRefreshTimeOther     int     `json:"preferOddsRefreshTimeOther"`
	PreferOddsRefreshTimeFavourite int     `json:"preferOddsRefreshTimeFavourite"`
	PreferWagerShowFormat          int     `json:"preferWagerShowFormat"`
	PreferAcceptHigherOdds         bool    `json:"preferAcceptHigherOdds"`
	PreferLanguageID               string  `json:"preferLanguageId"`
	PreferTimeZone                 int     `json:"preferTimeZone"`
	RestrictParlay                 bool    `json:"restrictParlay"`
	HasAcceptedNewTnc              bool    `json:"hasAcceptedNewTnc"`
	PreferTimeZoneInString         string  `json:"preferTimeZoneInString"`
	SkypeID                        string  `json:"skypeId"`
}

type TickBetResp struct {
	MinBet     int  `json:"minBet"`
	MaxBet     int  `json:"maxBet"`
	HasSession bool `json:"hasSession"`
}

type TickResp struct {
	League             string  `json:"league"`
	EventID            int     `json:"eventId"`
	MatchStartTime     int64   `json:"matchStartTime"`
	Score              string  `json:"score"`
	SelectionID        int     `json:"selectionId"`
	Handicap           float64 `json:"handicap"`
	DecimalOdds        float64 `json:"decimalOdds"`
	Odds               float64 `json:"odds"`
	OddsFormat         float64 `json:"oddsFormat"`
	AccumulativeOdds   string  `json:"accumulativeOdds"`
	EventPitcherID     int     `json:"eventPitcherId"`
	SelectionIndicator string  `json:"selectionIndicator"`
}

type OrderResp struct {
	Handicap        float64 `json:"handicap"`
	Odds            float64 `json:"odds"`
	OddsFormatted   string  `json:"oddsFormatted"`
	OddsFormat      float64 `json:"oddsFormat"`
	RequestID       string  `json:"requestId"`
	RespCode        int     `json:"respCode"`
	RespMessage     string  `json:"respMessage"`
	ResponseMsgCode string  `json:"responseMsgCode"`
	NewOdds         string  `json:"newOdds"`
	NewNativeOdds   string  `json:"newNativeOdds"`
	SelectionID     int     `json:"selectionId"`
	Stake           float64 `json:"stake"`
	Status          int     `json:"status"`
	BetID           int64   `json:"betId"`
	BetStatus       int     `json:"betStatus"`
	BetDate         int64   `json:"betDate"`
}
